package cn.edu.zzuli.web.bean.rowmapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import cn.edu.zzuli.web.bean.Forum;

public class ForumRowMapper implements RowMapper<Forum> {

		public Forum mapRow(ResultSet rs, int num) throws SQLException {
			Forum ret = new Forum();
			ret.setId(rs.getInt("id"));
			ret.setPid(rs.getInt("pid"));
			ret.setTitle(rs.getString("title"));
			ret.setAuthor(rs.getString("author"));
			ret.setContent(rs.getString("content"));
			ret.setViews(rs.getInt("views"));
			ret.setReplys(rs.getInt("replys"));
			ret.setSendTime(rs.getString("sendTime"));
			ret.setReplyTime(rs.getString("replyTime"));
			ret.setLastReplyMenber(rs.getString("lastReplyMenber"));
			ret.setBak(rs.getString("bak"));
			
			return ret;
		}

	}
